/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2021-2021. All rights reserved.
 */

package com.xjw.tool;

/**
 * @author 徐军文
 * @date 2021/7/2 22:40
 */
public class ServiceException extends RuntimeException {

    public static final String INFO = "INFO";
    public static final String ERROR = "ERROR";
    public static final String DEBUG = "DEBUG";

    private String type;
    private String msg;

    public ServiceException(String msg){
        super(msg);
        this.msg = msg;
        type = INFO;
    }

    public ServiceException(String type, String msg){
        super(msg);
        this.msg = msg;
        this.type = type;
    }

    public ServiceException(String msg,Throwable e){
        super(msg,e);
        this.msg = msg;
        this.type = INFO;
    }

}
